package org.example.springbootrabbitmq.confirm;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class AlarmConsume {

    @RabbitListener(queues = {ConfirmConfig.ALARM_QUEUE})
    public void consumeForConfirm(Message message) {
        String msg = new String(message.getBody());
        System.out.println("报警队列接收消息"+msg);
    }
}
